fix(claude): #551 — auto-continue outbox + UX + chore: staging 0.35.3rc18 + Task 4b#554
Merged
Nathan Schram (nathanschram) merged 1 commit intoMay 17, 2026
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced May 17, 2026
…: staging 0.35.3rc18 + Task 4b Three independent rc18 changes shipped together. The two #333 / #550 fixes are on separate PRs (fix/333-post-result-hang, fix/550-ask-question-keyboard-clear). - **Tier 0 — pre-swap outbox delivery (functional, ~3.6 % silent loss fix):** At the auto-continue trigger site (runner_bridge.py:~2935), call deliver_outbox_files BEFORE subprocess 2 spawns. Without this, files written by subprocess 1 during the stuck-after-tool-results window were orphaned (subprocess 2 starts fresh, never scans the outbox). Delivery is best-effort — a failure logs outbox.auto_continue_delivery_failed and does NOT block auto-continue. - **Tier 1 — reworded notice (UX):** changed the chat-side text from "⚠️ Auto-continuing — Claude stopped before processing tool results" to "🔁 Auto-resuming session after upstream Claude Code event". The 🔁 prefix signals recovery rather than failure and discourages /cancel-ing the salvage. Extracted into a small _format_auto_continue_notice() helper for testability. Task 4b — stall-suppression counter: - JsonlStreamState.stall_suppression_counts: dict[str, int]. - _bump_stall_suppression(reason) helper increments at three suppression sites: expected_wait (auto-cancel suppression), post_result (notification suppression), children_active (sleeping-main + active children). - session.summary now includes stall_suppressions=expected_wait:N,post_result:N,children_active:N so log audits can see suppression cascades without parsing nested JSON. chore: version bump 0.35.3rc17 → 0.35.3rc18 in pyproject.toml; uv.lock synced. CHANGELOG.md entry for v0.35.3rc18 covers #333 + #550 + #551 (the other two PRs reference the same entry). Tests (4 new): - test_exec_bridge.py: - test_551_auto_continue_notice_first_attempt - test_551_auto_continue_notice_repeat_attempt - test_4b_bump_stall_suppression_records_counts - test_4b_stall_suppression_count_bumped_on_post_result Full suite: 2675 passed, 2 skipped. preservation) deferred per scope decision in the rc18 plan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7a25e5b to
ddba754
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third of three rc18 PRs (companions: #552 #550, #553 #333). This PR ships the #551 auto-continue fixes, the Task 4b stall-suppression counter, and the rc18 version bump + CHANGELOG entry covering all three issues.
What changed
#551 — auto-continue outbox + UX (Tier 0 + Tier 1)
Tier 0 — pre-swap outbox delivery (functional): at the auto-continue trigger site in
runner_bridge.py, calldeliver_outbox_filesbefore subprocess 2 spawns. Without this, files written by subprocess 1 during the stuck-after-tool-results window were orphaned (subprocess 2 starts fresh and never scans the original outbox). ~3.6 % silent loss observed on lba-1; this PR closes it. Failure to deliver does NOT block auto-continue itself — the recovery is more important than any single batch of files.Tier 1 — UX recovery signal: changed the chat-side notice text from
⚠️ Auto-continuing — Claude stopped before processing tool resultsto🔁 Auto-resuming session after upstream Claude Code event. The 🔁 prefix signals recovery rather than failure and discourages users from/cancel-ing the salvage. Extracted into_format_auto_continue_notice()for testability.Tier 2/3/4 (catalog-staleness window, rate-limit-aware deferral, registry preservation) deferred per rc18 scope decision.
Task 4b — stall-suppression counter
JsonlStreamState.stall_suppression_counts: dict[str, int]_bump_stall_suppression(reason)helper increments at three suppression sites:expected_wait(auto-cancel suppression),post_result(notification),children_active(sleeping-main + active children).session.summarynow includesstall_suppressions=expected_wait:N,post_result:N,children_active:Nso log audits can see suppression cascades without parsing nested JSON.chore: rc18
pyproject.toml:0.35.3rc17→0.35.3rc18uv.locksyncedCHANGELOG.md: one rc18 entry covering all three fixes (investigate: Claude CLI session stays alive for ~36 min after finalresultevent (idle-but-alive UX gap) #333, bug: AskUserQuestion final-question inline keyboard not removed after answers sent (multi-Q flow) #550, bug(UX): auto-continue resume leaves MCP catalog degraded + can hit immediate rate-limit — user perceives as crash #551). The other two PRs reference the same entry.Files
src/untether/runner.py—JsonlStreamState.stall_suppression_countssrc/untether/runner_bridge.py— pre-swap outbox delivery, reworded notice + helper,_bump_stall_suppression(),session.summaryintegration, increments at suppression sitespyproject.toml+uv.lock— version bumpCHANGELOG.md— rc18 entrytests/test_exec_bridge.py— 4 new tests (2 notice, 2 stall counter)Test plan
uv run pytest— 2675 passed, 2 skipped, no regressions (was 2671 ondev; +4 new tests)uv run ruff format --check src/ tests/cleanuv run ruff check src/cleanuv lock --checkpassespython scripts/validate_release.py— rc18 detected, pre-release validation skipped (per release-discipline.md)@untether_dev_bot: send a prompt, verify Claude responds, footer correctly populated. (Pending rc18 build.)@untether_dev_bot:/ping,/usage,/config,/planmode,/verboseall functional.last_event_type=userexit can be reproduced on@untether_dev_bot, verify (a) outbox files delivered pre-swap, (b) 🔁 notice appears in chat, (c) subprocess 2 spawns cleanly.Closes #551.
Merge order (suggested)
To make CHANGELOG conflicts trivial: merge in the order PR 1 (#552 #550) → PR 2 (#553 #333) → PR 3 (this one, #551 + rc18). This PR contains the CHANGELOG version bump that references both other issues, so merging it last means the other two PRs don't touch the changelog.
🤖 Generated with Claude Code